package com.ll19.framework.spring.support;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * 用来获取spring的applicationContext ,在非注入程序中
 * 
 * @author <a href="http://www.LL19.com/">LL19.com</a>
 */
public class ApplicationContextRegister implements ApplicationContextAware {

	private Log log = LogFactory.getLog(getClass());

	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		ContextUtils.setApplicationContext(applicationContext);
		log.debug("======================== 已注册 SpringApplicationContext  ========================");
	}

}
